
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';

//封装scopedModel
class ScopedModelHelper{
  static T getModel<T extends Model>(BuildContext context){
    //rebuildOnchange如果为false就收不到状态改变的通知
    return ScopedModel.of<T>(context,rebuildOnChange: true);
  }

}